package course6;

public class SiSheWuRu {
    public static void main(String[] args) {
        double a = 20.66;
        int b = (int) a;

        System.out.println("b的值：" + b);
        System.out.println("a的值：" + a);

        double c = 0l;
        System.out.println(c);
        c = a-b;
        if (c >= 0.5) {
            b = b+1;
            System.out.println("a四舍五入后的值为：" + b);
        } else {
            System.out.println("a四舍五入后的值为：" + b);
        }
    }
}
